package com.controller;

import com.pojo.Repairstate;
import com.service.RepairstateService;
import com.vo.Result;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.util.List;

@Controller

@RequestMapping("/Repairstate")
public class RepairstateController {
    @RequestMapping("/toRepairstate")
    public String toRepairstate(){
        return "/Maintenance/leaders";
    }
    @Resource
    private RepairstateService repairstateService;
    @ResponseBody
    @RequestMapping("/selectAllRepairstate")
    public Result selectAllRepairstate(){
        List<Repairstate> repairstateList = repairstateService.selectAllReparstate();
        return Result.success(repairstateList);
    }
}
